<script type="text/javascript" src="<?= $this->config->base_url(); ?>assets/js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="<?= $this->config->base_url(); ?>assets/js/jquery-ui.js"></script>
<link rel="stylesheet" href="<?= $this->config->base_url(); ?>assets/css/jquery-ui.css" type="text/css" charset="utf-8" />

<script>

$(function() {
        var scntDiv = $('#p_scents');
        var i = $('#p_scents tr').size() + 1;
     $('.addScnt').live('click', function() {
                $('<tr id="dd'+ i +'"> <td><input type="text" class="span8"  name="sl_no[]"  id="sl_no'+i+'" /></td>  <td><input type="text" class="span8" name="part_name[]" id="part_name'+i+'" /></td><td><input type="text" class="span8"  name="part_code[]"  id="part_code'+i+'" /></td> <td><input type="text" class="span8"  name="slo_no[]"  id="slo_no'+i+'" /></td><td><a href="#" class="addScnt">ADD</a>&nbsp;&nbsp;&nbsp;<a href="#" id="'+i+'" class="remScnt">Remove</a></td></tr>').appendTo(scntDiv);
                i++;
                return false;
        });
        
        $('.remScnt').live('click', function() { 
       	
	            if( i > 2 ) {
                        
						$(this).parents('tr').remove();
                        i--;
                }
                return false;
		
        });
});










</script>

<div class="row-fluid">
<div class="span1">&nbsp;</div>
<div class="span10">
<h3 align="left"> Current Diagnosis</h3>
<form method="post" action="<?php echo site_url(); ?>/engineer/diagnosis/dispatch_slo" >
<!--<div id="infoMessage"><?php echo $message;?></div>-->

<hr>
<label><b>Receipt No.</b></label>
<input type="text" class="span2" name="case_no" readonly="readonly"value="<?php echo $case->case_no;?>"/>
<input type="hidden" name="case_id" value="<?php echo $case->id;?>"/>
<label><b>Case No.</b></label>
<input type="text" name="hp_case" id="hp_case1"/>

<table width="100%" class="table table-bordered" >

  <tr class="info">
              <td><b>SL No.</b></td>
              <td><b>Part Name</b></td>
              <td><b>Part Number</b></td>
              <td><b>SO No.</b></td>
              <td><b>Options</b></td>
             </tr>
			
 <tbody id="p_scents">           
  <tr><label for="p_scnts">
    <td><input type="text" class="span8" name='sl_no[]' id="sl_no" /></td>
    <td><input type="text" class="span8"  id="part_name"  name='part_name[]'/></td>
    <td><input type="text" class="span8" name="part_code[]" id="part_code" /></td>
    <td><input type="text" class="span8" name="slo_no[]"  id="slo_no" /></td>
  <td><a href="#" class="addScnt">ADD</a></td>
 </label> </tr>
 
  </tbody>
</table>
<br>
<br>
<p align="right"><input type="submit" name="dispatch" value="Completed"  class="btn btn-success" /></p>
</form>
</div>

</div>



